package cn.nexd.collector.beacon;

import android.content.Context;

import cn.nexd.collector.NexdCollectorConfiguration;
import cn.nexd.collector.core.Collector;
import cn.nexd.collector.listener.BeaconCollectorListener;

/**
 * Created by codngfish on 16/5/16.
 */
abstract class Beacon extends Collector {

    private static final String ANDROID_PERMISSION_BLUETOOTH = "android.permission.BLUETOOTH";
    private static final String ANDROID_PERMISSION_BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN";

    public Beacon(Context context, NexdCollectorConfiguration collectorConfiguration, BeaconCollectorListener beaconCollectorListener) {
        super(context, collectorConfiguration, beaconCollectorListener);
    }

    @Override
    public boolean permssion() {
        return checkPermission(ANDROID_PERMISSION_BLUETOOTH) && checkPermission(ANDROID_PERMISSION_BLUETOOTH_ADMIN);
    }
}
